package com.ruoyi.kindergarten.controller;

import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.kindergarten.domain.Student;
import com.ruoyi.kindergarten.domain.TwinPhysicalDevice;
import com.ruoyi.kindergarten.service.ITwinPhysicalDeviceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.querydsl.binding.QuerydslPredicate;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/twinPhysicalDevice")
public class TwinPhysicalDeviceController {
    @Autowired
    private ITwinPhysicalDeviceService twinPhysicalDeviceService;

    @PostMapping
    public void post(@RequestBody TwinPhysicalDevice twinPhysicalDevice) {
        twinPhysicalDeviceService.post(twinPhysicalDevice);
    }

    @GetMapping
    public Double getValue(@RequestParam String key){
        return twinPhysicalDeviceService.getValue(key);
    }


}
